import { use, useDeferredValue, useEffect, useInsertionEffect, useMemo } from "react";
import { useState, useRef, useLayoutEffect } from "react";
import axios from "axios";
import './App.scss'
import List from "./20-List";
const p = new Promise((resolve, reject) => {
  resolve('哈哈哈哈哈')}
  )
function App(){
 // use 是用来在 Context 或者 Promise 中提取内容用的
const res=use(p)
console.log(res);


  return (
    <div>
      <h1 className="rotate">APP</h1>
      <button onClick={() => {

// 1. 通过 .then 获取
// p.then(res => {
//     console.log(res);
// })
//  2. 通过 await 取值
// const res = await p
// console.log(res);
}}>求点击</button>
    </div>
  );
}

export default App;
